import torch

y = torch.LongTensor([0])
z = torch.Tensor([[0.2,0.2,0.2]])
criterion = torch.nn.CrossEntropyLoss()
loss = criterion(z,y)
print(loss)